<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

// +----------------------------------------------------------------------


use think\Route;

//get
Route::get('test', 'api/test/index');


Route::put('test/:id', 'api/Test/update');

Route::delete('test/:id', 'api/Test/delete');


Route::resource('test', 'api/Test');//测试


Route::get('api/:ver/cat', 'api/:ver.cat/read');//获取栏目列表数据

Route::get('api/:ver/index', 'api/:ver.index/index');//获取首页列表数据

Route::get('api/:ver/init', 'api/:ver.index/init');//获取版本升级数据


Route::resource('api/:ver/news', 'api/:ver.news');//获取列表页数据

Route::get('api/:ver/rank', 'api/:ver.rank/index');//获取排行页数据

//短信验证码相关
Route::resource('api/:ver/identify', 'api/:ver.identify');

//app登陆的路由
Route::post('api/:ver/login', 'api/:ver.login/save');

//app用户推出的路由
Route::get('api/:ver/logout', 'api/:ver.user/logout');


//测试
Route::post('api/:ver/test', 'api/:ver.user/test');

//app用户信息资源路由
Route::resource('api/:ver/user', 'api/:ver.user');

//检验用户名
Route::get('api/:ver/name', 'api/:ver.user/name');

//app图片上传
Route::post('api/:ver/image', 'api/:ver.image/save');

//app点赞路由
Route::post('api/:ver/upvote', 'api/:ver.upvote/save');


//app点赞路由
Route::delete('api/:ver/upvote', 'api/:ver.upvote/delete');

//app判断是否点赞路由
Route::get('api/:ver/upvote/:id', 'api/:ver.upvote/read');


//app评论路由
Route::post('api/:ver/comment', 'api/:ver.comment/save');


//app获取评论列表路由
Route::get('api/:ver/comment/:id', 'api/:ver.comment/read');